import request from '@/utils/request'
// import axios from 'axios'
import { apiVersion } from '@/config'
// import { getDeviceId } from '@/utils/tool'


// 分配GPU型号
export function setNodeGpuModel(nodeName, gpuModel) {
    return request({
        url: `/admin/${apiVersion}/node/${nodeName}/gpu/${gpuModel}`,
        method: 'put'
    })
}
// 删除GPUI型号
export function delGpuModel(nodeName) {
    return request({
        url: `/admin/${apiVersion}/node/${nodeName}/gpu`,
        method: 'delete',
    })
}


// 查询列表
export function getNodelAll(data) {
    return request({
        url: `/admin/${apiVersion}/node/all`,
        method: 'get',
        data
    })
}

// 节点下线
export function NodelDown(data) {
    return request({
        url: `/admin/${apiVersion}/node/${data.nodeName}/down`,
        method: 'DELETE',
    })
}

// 节点上线
export function NodelUp(data) {
    return request({
        url: `/admin/${apiVersion}/node/${data.nodeName}/up`,
        method: 'PUT',
    })
}
